/**
 * 
 */
package com.haisen.lee.util;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Haisen Lee
 * 
 */
public enum DOMParserType {
	HTML {
		@Override
		public String getName() {
			return "HTML";
		}

		@Override
		public Map<String, DOMParserType> getDealDOMParserType() {
			Map<String, DOMParserType> dealDOMParserType = new HashMap<String, DOMParserType>();
			dealDOMParserType.put(DOMParserType.FRAMESET.getName(),
					DOMParserType.FRAMESET);
			dealDOMParserType.put(DOMParserType.HEAD.getName(),
					DOMParserType.HEAD);
			dealDOMParserType.put(DOMParserType.SCRIPT.getName(),
					DOMParserType.SCRIPT);
			return dealDOMParserType;
		}
	},
	HEAD {
		@Override
		public Map<String, DOMParserType> getDealDOMParserType() {
			Map<String, DOMParserType> dealDOMParserType = new HashMap<String, DOMParserType>();
			dealDOMParserType.put(DOMParserType.META.getName(),
					DOMParserType.META);
			return dealDOMParserType;
		}

		@Override
		public String getName() {
			return "HEAD";
		}
	},
	META {
		@Override
		public Map<String, DOMParserType> getDealDOMParserType() {
			Map<String, DOMParserType> dealDOMParserType = new HashMap<String, DOMParserType>();
			return dealDOMParserType;
		}

		@Override
		public String getName() {
			return "META";
		}
	},
	SCRIPT {
		@Override
		public String getName() {
			return "SCRIPT";
		}

		@Override
		public Map<String, DOMParserType> getDealDOMParserType() {
			Map<String, DOMParserType> dealDOMParserType = new HashMap<String, DOMParserType>();
			return dealDOMParserType;
		}
	},
	BODY {
		@Override
		public String getName() {
			return "BODY";
		}

		@Override
		public Map<String, DOMParserType> getDealDOMParserType() {
			Map<String, DOMParserType> dealDOMParserType = new HashMap<String, DOMParserType>();
			dealDOMParserType.put(DOMParserType.DIV.getName(),
					DOMParserType.DIV);
			dealDOMParserType.put(DOMParserType.FROM.getName(),
					DOMParserType.FROM);
			dealDOMParserType.put(DOMParserType.INPUT.getName(),
					DOMParserType.INPUT);
			dealDOMParserType.put(DOMParserType.SELECT.getName(),
					DOMParserType.SELECT);
			dealDOMParserType.put(DOMParserType.SPAN.getName(),
					DOMParserType.SPAN);
			dealDOMParserType.put(DOMParserType.B.getName(), DOMParserType.B);
			return dealDOMParserType;
		}
	},
	FRAMESET {
		@Override
		public String getName() {
			return "FRAMESET";
		}

		@Override
		public Map<String, DOMParserType> getDealDOMParserType() {
			Map<String, DOMParserType> dealDOMParserType = new HashMap<String, DOMParserType>();
			dealDOMParserType.put(DOMParserType.HTML.getName(),
					DOMParserType.HTML);
			return dealDOMParserType;
		}
	},
	FROM {
		@Override
		public String getName() {
			return "FROM";
		}

		@Override
		public Map<String, DOMParserType> getDealDOMParserType() {
			Map<String, DOMParserType> dealDOMParserType = new HashMap<String, DOMParserType>();
			dealDOMParserType.put(DOMParserType.DIV.getName(),
					DOMParserType.DIV);
			dealDOMParserType.put(DOMParserType.SPAN.getName(),
					DOMParserType.SPAN);
			dealDOMParserType.put(DOMParserType.INPUT.getName(),
					DOMParserType.INPUT);
			dealDOMParserType.put(DOMParserType.SELECT.getName(),
					DOMParserType.SELECT);
			return dealDOMParserType;
		}
	},
	TABLE {
		@Override
		public Map<String, DOMParserType> getDealDOMParserType() {
			Map<String, DOMParserType> dealDOMParserType = new HashMap<String, DOMParserType>();
			dealDOMParserType.put(DOMParserType.DIV.getName(),
					DOMParserType.DIV);
			dealDOMParserType.put(DOMParserType.FROM.getName(),
					DOMParserType.FROM);
			dealDOMParserType.put(DOMParserType.SPAN.getName(),
					DOMParserType.SPAN);
			dealDOMParserType.put(DOMParserType.INPUT.getName(),
					DOMParserType.INPUT);
			dealDOMParserType.put(DOMParserType.SELECT.getName(),
					DOMParserType.SELECT);
			dealDOMParserType.put(DOMParserType.TR.getName(), DOMParserType.TR);
			return dealDOMParserType;
		}

		@Override
		public String getName() {
			return "TABLE";
		}
	},
	TR {
		@Override
		public Map<String, DOMParserType> getDealDOMParserType() {
			Map<String, DOMParserType> dealDOMParserType = new HashMap<String, DOMParserType>();
			dealDOMParserType.put(DOMParserType.DIV.getName(),
					DOMParserType.DIV);
			dealDOMParserType.put(DOMParserType.FROM.getName(),
					DOMParserType.FROM);
			dealDOMParserType.put(DOMParserType.SPAN.getName(),
					DOMParserType.SPAN);
			dealDOMParserType.put(DOMParserType.INPUT.getName(),
					DOMParserType.INPUT);
			dealDOMParserType.put(DOMParserType.SELECT.getName(),
					DOMParserType.SELECT);
			dealDOMParserType.put(DOMParserType.TR.getName(), DOMParserType.TR);
			return dealDOMParserType;
		}

		@Override
		public String getName() {
			return "TR";
		}
	},
	TD {
		@Override
		public Map<String, DOMParserType> getDealDOMParserType() {
			Map<String, DOMParserType> dealDOMParserType = new HashMap<String, DOMParserType>();
			dealDOMParserType.put(DOMParserType.DIV.getName(),
					DOMParserType.DIV);
			dealDOMParserType.put(DOMParserType.FROM.getName(),
					DOMParserType.FROM);
			dealDOMParserType.put(DOMParserType.SPAN.getName(),
					DOMParserType.SPAN);
			dealDOMParserType.put(DOMParserType.INPUT.getName(),
					DOMParserType.INPUT);
			dealDOMParserType.put(DOMParserType.SELECT.getName(),
					DOMParserType.SELECT);
			dealDOMParserType.put(DOMParserType.TABLE.getName(),
					DOMParserType.TABLE);
			return dealDOMParserType;
		}

		@Override
		public String getName() {
			return "TD";
		}
	},
	INPUT {
		@Override
		public String getName() {
			return "INPUT";
		}

		@Override
		public Map<String, DOMParserType> getDealDOMParserType() {
			Map<String, DOMParserType> dealDOMParserType = new HashMap<String, DOMParserType>();
			return dealDOMParserType;
		}
	},
	B {
		@Override
		public String getName() {
			return "B";
		}

		@Override
		public Map<String, DOMParserType> getDealDOMParserType() {
			Map<String, DOMParserType> dealDOMParserType = new HashMap<String, DOMParserType>();
			return dealDOMParserType;
		}
	},
	IMG {
		@Override
		public String getName() {
			return "IMG";
		}

		@Override
		public Map<String, DOMParserType> getDealDOMParserType() {
			Map<String, DOMParserType> dealDOMParserType = new HashMap<String, DOMParserType>();
			return dealDOMParserType;
		}
	},
	SELECT {
		@Override
		public String getName() {
			return "SELECT";
		}

		@Override
		public Map<String, DOMParserType> getDealDOMParserType() {
			Map<String, DOMParserType> dealDOMParserType = new HashMap<String, DOMParserType>();
			dealDOMParserType.put(DOMParserType.OPTION.getName(),
					DOMParserType.OPTION);
			return dealDOMParserType;
		}
	},
	OPTION {
		@Override
		public Map<String, DOMParserType> getDealDOMParserType() {
			Map<String, DOMParserType> dealDOMParserType = new HashMap<String, DOMParserType>();
			return dealDOMParserType;
		}

		@Override
		public String getName() {
			return "OPTION";
		}
	},
	DIV {
		@Override
		public String getName() {
			return "DIV";
		}

		@Override
		public Map<String, DOMParserType> getDealDOMParserType() {
			Map<String, DOMParserType> dealDOMParserType = new HashMap<String, DOMParserType>();
			dealDOMParserType.put(DOMParserType.FROM.getName(),
					DOMParserType.FROM);
			dealDOMParserType.put(DOMParserType.INPUT.getName(),
					DOMParserType.INPUT);
			dealDOMParserType.put(DOMParserType.SELECT.getName(),
					DOMParserType.SELECT);
			dealDOMParserType.put(DOMParserType.SPAN.getName(),
					DOMParserType.SPAN);
			dealDOMParserType.put(DOMParserType.DIV.getName(),
					DOMParserType.DIV);
			return dealDOMParserType;
		}
	},
	SPAN {
		@Override
		public String getName() {
			return "SPAN";
		}

		@Override
		public Map<String, DOMParserType> getDealDOMParserType() {
			Map<String, DOMParserType> dealDOMParserType = new HashMap<String, DOMParserType>();
			dealDOMParserType.put(DOMParserType.FROM.getName(),
					DOMParserType.FROM);
			dealDOMParserType.put(DOMParserType.INPUT.getName(),
					DOMParserType.INPUT);
			dealDOMParserType.put(DOMParserType.SELECT.getName(),
					DOMParserType.SELECT);
			dealDOMParserType.put(DOMParserType.SPAN.getName(),
					DOMParserType.SPAN);
			dealDOMParserType.put(DOMParserType.DIV.getName(),
					DOMParserType.DIV);
			return dealDOMParserType;
		}

	};
	public abstract String getName();

	public abstract Map<String, DOMParserType> getDealDOMParserType();
}
